﻿<Page x:Class="PFC.Program.Verification.Pages.Login"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:PFC.Program.Verification.Pages"
      mc:Ignorable="d" 
      d:DesignHeight="450" 
      d:DesignWidth="800"
      Title="PFC - Вход">

    <Grid Background="#FFFF8000">

        <Grid.RowDefinitions>
            <RowDefinition Height="50"/>
            <RowDefinition Height="400"/>
        </Grid.RowDefinitions>

        <!--Кнопка назад-->
        <Button Name="back_Btn"
                Style="{DynamicResource ButtonStyle}"
                Content="Назад"
                TabIndex="0"
                HorizontalAlignment="Left"
                Click="back_Btn_Click"/>

        <!--GroupBox c элементами для входа-->
        <GroupBox Name="AuthorizationGb"
                  Style="{DynamicResource GroupBoxStyle}"
                  Visibility="Visible"
                  Header="| Вход |"
                  Width="160"
                  Grid.Row="1"
                  Height="150"
                  HorizontalAlignment="Center"
                  VerticalAlignment="Top"
                  Margin="0 50 0 0">

            <Grid>

                <!--Сетка для элементов в GroupBox-->
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="60"/>
                </Grid.RowDefinitions>

                <!--Логин-->
                <TextBlock Grid.Row="0"
                           HorizontalAlignment="Left"   
                           Text="Логин"
                           FontSize="16"
                           VerticalAlignment="Top"
                           Background="Gray"
                           Padding="3 0 3 0"
                           Foreground="White"
                           Margin="14,10,0,0" Height="20"/>

                <TextBox Name="textBox_login"
                         TabIndex="1"
                         Grid.Row="0"
                         Style="{DynamicResource TextBoxStyle}"
                         HorizontalAlignment="Center" 
                         VerticalAlignment="Top" 
                         MaxLength="30"
                         Margin="0,30,0,0">

                    <TextBox.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="0 5 5 5"/>
                        </Style>
                    </TextBox.Resources>

                </TextBox>

                <!--Пароль-->
                <TextBlock HorizontalAlignment="Left"   
                           Text="Пароль" 
                           Foreground="White"
                           Background="Gray"
                           Padding="3 0 3 0"
                           FontSize="16"
                           VerticalAlignment="Top" 
                           Margin="14,6,0,0" Grid.Row="1"/>

                <PasswordBox Name="passwordBox_password"
                             Style="{DynamicResource PasswordBoxStyle}"
                             Grid.Row="1"   
                             TabIndex="2"
                             HorizontalAlignment="Center" 
                             VerticalAlignment="Top" 
                             MaxLength="50"
                             Margin="0,25,0,0"/>
            </Grid>

        </GroupBox>

        <!--GroupBox c элементами для изменения пароля-->
        <GroupBox Name="ChangePasswordGb"
                  Style="{DynamicResource GroupBoxStyle}"
                  Visibility="Hidden"
                  Header="| Восстановление |"
                  Width="160"
                  Grid.Row="1"
                  Height="200"
                  HorizontalAlignment="Center"
                  VerticalAlignment="Top"
                  Margin="0 20 0 0">

            <Grid>

                <!--Сетка для элементов в GroupBox-->
                <Grid.RowDefinitions>
                    <RowDefinition Height="60"/>
                    <RowDefinition Height="60"/>
                    <RowDefinition Height="60"/>
                </Grid.RowDefinitions>

                <!--Логин-->
                <TextBlock Grid.Row="0"
                           HorizontalAlignment="Left"   
                           Text="Логин"
                           FontSize="16"
                           VerticalAlignment="Top"
                           Background="Gray"
                           Padding="3 0 3 0"
                           Foreground="White"
                           Margin="14,10,0,0" Height="20"/>

                <TextBox Name="textBox_RepeatLogin"
                         TabIndex="1"
                         Grid.Row="0"
                         Style="{DynamicResource TextBoxStyle}"
                         HorizontalAlignment="Center" 
                         VerticalAlignment="Top" 
                         MaxLength="30"
                         Margin="0,30,0,0">

                    <TextBox.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="0 5 5 5"/>
                        </Style>
                    </TextBox.Resources>

                </TextBox>
                
                <!--Секретная фраза-->
                <TextBlock Grid.Row="1"
                           HorizontalAlignment="Left"   
                           Text="Фраза"
                           FontSize="16"
                           VerticalAlignment="Top"
                           Background="Gray"
                           Padding="3 0 3 0"
                           Foreground="White"
                           Margin="14,10,0,0" Height="20"/>

                <TextBox Name="textBox_phrase"
                         TabIndex="1"
                         Grid.Row="1"
                         Style="{DynamicResource TextBoxStyle}"
                         HorizontalAlignment="Center" 
                         VerticalAlignment="Top" 
                         MaxLength="30"
                         Margin="0,30,0,0">

                    <TextBox.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="0 5 5 5"/>
                        </Style>
                    </TextBox.Resources>

                </TextBox>

                <!--Пароль-->
                <TextBlock HorizontalAlignment="Left"   
                           Text="Новый пароль" 
                           Foreground="White"
                           Background="Gray"
                           Padding="3 0 3 0"
                           FontSize="16"
                           VerticalAlignment="Top" 
                           Margin="14,6,0,0" 
                           Grid.Row="2"/>

                <PasswordBox Name="passwordBox_NewPassword"
                             Style="{DynamicResource PasswordBoxStyle}"
                             Grid.Row="2"   
                             TabIndex="2"
                             HorizontalAlignment="Center" 
                             VerticalAlignment="Top" 
                             MaxLength="50"
                             Margin="0,25,0,0"/>
            </Grid>

        </GroupBox>

        <!--Кнопка перехода на изменение пароля (если забыл)-->
        <Button Name="button_OpenChangePassword"
                Style="{DynamicResource ButtonStyle}"
                Grid.Row="2"
                TabIndex="4"
                Width="90"
                Height="30"
                Margin="0 0 0 125"
                FontSize="13"
                VerticalAlignment="Bottom"
                Content="Забыл пароль"
                Click="button_OpenChangePassword_Click"/>

        <!--Кнопка входа-->
        <Button Name="button_Authorization"
                Visibility="Visible"
                Style="{DynamicResource ButtonStyle}"
                Grid.Row="2"
                TabIndex="3"
                Width="160"
                Margin="0 0 0 160"
                VerticalAlignment="Bottom"
                Content="Войти" 
                Click="button_Authorization_Click"/>
        
        <!--Кнопка изменения пароля-->
        <Button Name="button_ChangePassword"
                Visibility="Hidden"
                Style="{DynamicResource ButtonStyle}"
                Grid.Row="2"
                TabIndex="3"
                Width="160"
                Margin="0 0 0 140"
                VerticalAlignment="Bottom"
                Content="Изменить пароль"
                Click="button_ChangePassword_Click"/>
    </Grid>
</Page>
